const layout = () => import("@/views/layout/layout");

const common = [
  {
    path: "/layout",
    name: "layout",
    component: layout,
  },
  {
    path: "/dashboard",
    component: layout,
    children: [
      {
        name: "仪表盘",
        path: "/dashboard",
        component: () => import("@/views/dashboard/dashboard"),
      },
    ],
  },
  {
    path: "/buttons",
    component: layout,
    children: [
      {
        name: "Charts",
        path: "/charts",
        component: () => import("@/views/basemodule/charts"),
      },
      {
        name: "Icon图标",
        path: "/icons",
        component: () => import("@/views/basemodule/icons"),
      },
      {
        name: "Tabs页签",
        path: "/tabs",
        component: () => import("@/views/basemodule/tabs"),
      },
      {
        name: "Tree控件",
        path: "/tree",
        component: () => import("@/views/basemodule/tree"),
      },
    ],
  },
  {
    path: "/forms",
    component: layout,
    children: [
      {
        name: "Input 输入框",
        path: "/input",
        component: () => import("@/views/forms/input"),
      },
      {
        name: "Select 选择框",
        path: "/select",
        component: () => import("@/views/forms/select"),
      },
      {
        name: "Transfer 穿梭框",
        path: "/transfer",
        component: () => import("@/views/forms/transfer"),
      },
    ],
  },
  {
    path: "/datas",
    component: layout,
    children: [
      {
        name: "Table 表格",
        path: "/table",
        component: () => import("@/views/datas/table"),
      },
    ],
  },
  {
    path: "/recorder",
    component: layout,
    children: [
      {
        name: "Voice",
        path: "/voice",
        component: () => import("@/views/recorder/voice"),
      },
    ],
  },
  {
    path: "/errors",
    component: layout,
    children: [
      {
        name: "401错误页",
        path: "/401",
        component: () => import("@/components/errorpages/401"),
      },
      {
        name: "404错误页",
        path: "/404",
        component: () => import("@/components/errorpages/404"),
      },
    ],
  },
  {
    name: "404",
    path: "*",
    component: () => import("@/components/errorpages/404"),
    alias: "/404",
  },
];

export default common;
